package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 用户保存问卷
 * 创建时间 2019/4/16 9:48 AM
 * 修改时间 2019/4/16 9:48 AM
 * @author chy
 * @since v1.0
 * @version v1.0
 */
@Setter
@Getter
@ToString
public class MsgSurveySaveDTO extends BaseDTO {
    /**
     * 问卷id
     */
    @NotNull(message = "{dto.msg.msgSurveySave.surveyId.NotNull}")
    @Min(value=0, message = "{dto.msg.msgSurveySave.surveyId.Min}")
    private Integer surveyId;
    /**
     * 问卷名
     */
    private String surveyName;
    /**
     * 被评价人id(admin的id),当问卷为对个人评价时有效
     */
    private Integer sysUserId;
    /**
     * 被评价人名字，当问卷为对个人评价时有效
     */
    private String sysUserName;
    /**
     * 答案
     */
    private List<Answer> answers;

    //========== getters and setters ==========

    @Setter
    @Getter
    public static class Answer{
        /**
         * 问题id
         */
        Integer questionId;
        /**
         * 答案
         */
        String answer;
        /**
         * 吐槽、建议
         */
        String memo;
    }
}
